import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 树形列表数据接口
    getTreeData: {
        url: '/adminc/v1/config_manage/m_entity_categ/get_tree',
        method: 'post'
    },
    // 获取标准码数据
    getStandardCode: {
        url: '/api/v1/config/code/get_codelist',
        method: 'post'
    },
    //获取数据源列表数据
    getDataSourceList: {
        url: '/api/v1/data/data_resource/data_resource_list',
        method: 'get'
    },
    //新增数据源
    addDataSource: {
        url: '/api/v1/data/data_resource/data_resource_create',
        method: 'post'
    },
    //修改数据源
    modifyDataSource: {
        url: '/api/v1/data/data_resource/data_resource_edit',
        method: 'put'
    },
    //删除数据源
    onDelDataSource: {
        url: '/api/v1/data/data_resource/data_resource_delete',
        method: 'delete'
    },
    //连接测试
    connectTest: {
        url: '/api/v1/data/data_resource/data_resource_con',
        method: 'put'
    }

}

export default openBuildService(settings)